<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateAdresseTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreateAdresseLabel_idAdresse}" for="idAdresse" />
                    <h:inputText id="idAdresse" value="#{adresseController.selected.idAdresse}" title="#{bundle.CreateAdresseTitle_idAdresse}" required="true" requiredMessage="#{bundle.CreateAdresseRequiredMessage_idAdresse}"/>
                    <h:outputLabel value="#{bundle.CreateAdresseLabel_adresse}" for="adresse" />
                    <h:inputText id="adresse" value="#{adresseController.selected.adresse}" title="#{bundle.CreateAdresseTitle_adresse}" required="true" requiredMessage="#{bundle.CreateAdresseRequiredMessage_adresse}"/>
                    <h:outputLabel value="#{bundle.CreateAdresseLabel_adresseComplement}" for="adresseComplement" />
                    <h:inputText id="adresseComplement" value="#{adresseController.selected.adresseComplement}" title="#{bundle.CreateAdresseTitle_adresseComplement}" required="true" requiredMessage="#{bundle.CreateAdresseRequiredMessage_adresseComplement}"/>
                    <h:outputLabel value="#{bundle.CreateAdresseLabel_codePostal}" for="codePostal" />
                    <h:inputText id="codePostal" value="#{adresseController.selected.codePostal}" title="#{bundle.CreateAdresseTitle_codePostal}" required="true" requiredMessage="#{bundle.CreateAdresseRequiredMessage_codePostal}"/>
                    <h:outputLabel value="#{bundle.CreateAdresseLabel_ville}" for="ville" />
                    <h:inputText id="ville" value="#{adresseController.selected.ville}" title="#{bundle.CreateAdresseTitle_ville}" required="true" requiredMessage="#{bundle.CreateAdresseRequiredMessage_ville}"/>
                    <h:outputLabel value="#{bundle.CreateAdresseLabel_idClient}" for="idClient" />
                    <h:selectOneMenu id="idClient" value="#{adresseController.selected.idClient}" title="#{bundle.CreateAdresseTitle_idClient}" required="true" requiredMessage="#{bundle.CreateAdresseRequiredMessage_idClient}">
                        <f:selectItems value="#{clientController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{adresseController.create}" value="#{bundle.CreateAdresseSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{adresseController.prepareList}" value="#{bundle.CreateAdresseShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.CreateAdresseIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
